package runOob.Extends;

class Animal {
    private String name;
    private int id;

    Animal(String myName, int myId) {
        name = myName;
        id = myId;
    }

    void eat() {
        System.out.println(name + "正在吃");
    }

    void sleep() {
        System.out.println(name + "正在睡");
    }

    void introduction() {
        System.out.println("大家好,我是" + id + "号" + name);
    }
}
